package com.qiaofang.applet.service.property.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel("新房详情DTO")
public class FirsthandEstateAdminListDto {

    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("楼盘UUID")
    private String estateUuid;

    @ApiModelProperty("楼盘唯一UUID")
    private String estateUniqueUuid;

    @ApiModelProperty("销售状态")
    private String saleStatusName;

    @ApiModelProperty("楼盘名称")
    private String estateName;

    @ApiModelProperty("城市名")
    private String cityName;

    @ApiModelProperty("区名")
    private String areaName;

    @ApiModelProperty("楼盘均价")
    private BigDecimal averagePrice;

    @ApiModelProperty("建筑面积范围（户型图最小和最大 比如 105-311）")
    private String buildingAreaRange;

    @ApiModelProperty("楼盘地址")
    private String address;

    @ApiModelProperty("建筑类型")
    private String buildingType;

    @ApiModelProperty("开盘日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date openDate;

    @ApiModelProperty("交房日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkOutDate;

    @ApiModelProperty("物业类型")
    private String propertyType;

    @ApiModelProperty("开发商")
    private String developers;

    @ApiModelProperty(value = "是否推荐")
    private Boolean recommend;

    @ApiModelProperty(value = "推荐语")
    private String recommendDescribe;

    @ApiModelProperty(value = "上架/下架")
    private String upDownFlag;

    @ApiModelProperty(value = "销售进度 (1：待售、2：在售期房、3：在售现房、4：认筹中、5：尾盘、6：售罄)")
    private String saleStatus;

    @ApiModelProperty("是否推荐 是/否")
    private String recommendStr;

    @ApiModelProperty(value = "首页主推排序")
    private Integer recommendSort;

    public String getRecommendStr(){
        return recommend != null && recommend ? "是" : "否";
    }
}
